/*
*    Phantom v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#pragma once

#include "ssi_function.h"
#include "ssi_internals.h"
#include "ssi_status.h"
#include "ssi_functionapi.h"
#include "ssi_functiondecl.h"
#include "ssi_string.h"


//class SSI_FunctionAPI;
//class CFunction;
//class CFunctionDecl;
//class CStatus;
//class TNodeTree;
//typedef TNodeTree<CFunctionDecl> FuncTree;
class SSI_SCRIPTDLL_API CFunctionSet
{
public:
	CFunctionSet(void);
	virtual ~CFunctionSet(void);
	FuncTree Funcs;
	CStatus AddFunction(CFunctionDecl& aFunc);
	CStatus CheckFunction(CFunction& InFunc, SSI_FunctionAPI& theAPI, CFunctionDecl& theDecl);
	FuncNode* FindFunctionDecl(CFunctionDecl &aFunc, FuncNode* In);
	CStatus SetPackageName(const char* Name);
	StringTree Packages;
	String CurrPackage;
	SSI_BOOL IsFunction(CFunctionDecl& InDecl);
	int AddPackage(String& In);
  void ClearPackage(String &sPackage);
  CFunctionSet& operator =(CFunctionSet &Other);
};



